-
Notifications
You must be signed in to change notification settings - Fork 883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] - Fix URL-Bar LTR-RTL Clipping #26360
base: master
Are you sure you want to change the base?
Conversation
.environment(\.layoutDirection, .leftToRight) | ||
.flipsForRightToLeftLayoutDirection(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are better put in URLElidedText
directly since you'd probably want it anywhere its used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Fixed.
textSize = attributedText?.size() ?? .zero | ||
textSize = (text as? NSString)?.size(withAttributes: [.font: font!]) ?? .zero |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you setting this twice?
@@ -407,6 +407,92 @@ extension URL { | |||
|
|||
return proposedPath | |||
} | |||
|
|||
public var isLTRRendered: Bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please place in BraveShared, not Shared (reminder: Shared is a legacy Firefox target we're trying to avoid adding new things to)
4d09485
to
e471689
Compare
…is works for ALL urls so far. Needs Unit Tests.
e471689
to
e75aef4
Compare
Address feedback
…text direction and base direction
e75aef4
to
00a2cc4
Compare
) | ||
|
||
// Strip prefixes | ||
if let range = renderedString.range(of: "^(www|mobile|m)\\.", options: .regularExpression) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't omitTrivialSubdomains
above do the same?
Resolves brave/brave-browser#42070 and https://github.com/brave/internal/issues/1228
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: